import axios from './api'
// 系统接口
export const sysInterfacePage = params => {
  return axios.post('/v1/sysInterface/pageQuery', params).then(res => res.data)
}
export const sysInterfaceGet = params => {
  return axios.get(`/v1/sysInterface/get/${params}`).then(res => res.data)
}
export const sysInterfaceUpdate = params => {
  return axios.put(`/v1/sysInterface/update`, params).then(res => res.data)
}
export const sysInterfaceSave = params => {
  return axios.post(`/v1/sysInterface/save`, params).then(res => res.data)
}
export const sysInterfaceDelete = params => {
  return axios.delete(`/v1/sysInterface/delete/${params}`).then(res => res.data)
}

export const sysInterfaceGetAll = () => {
  return axios.get(`/v1/sysInterface/getAll`).then(res => res.data)
}
export const sysInterfaceGetAllocated = params => {
  return axios
    .get(`/v1/sysInterface/getAllocated/${params}`)
    .then(res => res.data)
}
export const sysMenuInterfaceDelete = params => {
  return axios
    .post(`/v1/sysInterface/deleteRelation`, params)
    .then(res => res.data)
}
export const sysMenuInterfaceSave = params => {
  return axios
    .post(`/v1/sysInterface/saveRelation`, params)
    .then(res => res.data)
}
